Pro Python 3 by J. Burton Browning & Marty Alchin
Author:J. Burton Browning & Marty Alchin
Language: eng
Format: epub
ISBN: 9781484243855
Publisher: Apress
Basic Operations
Even though there are a wide variety of object types available in Python, most of them share a common set of operations. These are considered to be something of a core feature set, representing some of the most common high-level aspects of object manipulation, many of which are just as applicable to simple numbers as they are to many other objects.
One of the simplest and most common needs in all of programming, Python included, is to evaluate an expression to a Boolean value so that it can be used to make simple decisions. Typically this is used in if blocks, but these decisions also come into play when using while, and Boolean operations such as and and or. When Python encounters one of these situations, it relies on the behavior of the __bool__() method to determine the Boolean equivalent of an object.
The __bool__() method , if implemented, accepts just the usual self and must return either True or False. This allows any object to determine whether it should be considered to be true or false in a given expression, using whatever methods or attributes are appropriate:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12593)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9804)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7773)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7568)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7192)
Microservices with Go by Alexander Shuiskov(6955)
Practical Design Patterns for Java Developers by Miroslav Wengner(6873)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6816)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6426)
Angular Projects - Third Edition by Aristeidis Bampakos(6235)
The Art of Crafting User Stories by The Art of Crafting User Stories(5751)
NetSuite for Consultants - Second Edition by Peter Ries(5676)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5492)
Kotlin in Action by Dmitry Jemerov(5076)
